-- GENERATED SPELL FOR [Shirrak the Dead Watcher] --


function spell0_18371(pUnit, Event) --@Attract Magic,n/a--
pUnit:FullCastSpellOnTarget(32265,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18371', 0, 1)
end

function spell1_18371(pUnit, Event) --@Carnivorous Bite,n/a--
pUnit:FullCastSpellOnTarget(36383,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18371', 20000, 1)
end

function spell2_18371(pUnit, Event) --@Carnivorous Bite,n/a--
pUnit:FullCastSpellOnTarget(39382,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18371', 20000, 1)
end

function Sorts_18371(pUnit, Event)
local choix_sorts_18371 = math.random(0, 2)
if choix_sorts_18371 == 0 then
pUnit:RegisterEvent('spell0_18371', 1, 1)
end
if choix_sorts_18371 == 1 then
pUnit:RegisterEvent('spell1_18371', 1, 1)
end
if choix_sorts_18371 == 2 then
pUnit:RegisterEvent('spell2_18371', 1, 1)
end
end

function mob18371_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18371', math.random(1500, 3000), 1)
end

function mob18371_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18371_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18371_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18371, 1, 'mob18371_Action')
RegisterUnitEvent(18371, 2, 'mob18371_Leave')
RegisterUnitEvent(18371, 3, 'mob18371_Kill')
RegisterUnitEvent(18371, 4, 'mob18371_Die')
